1
'*************************** Module Header ******************************'
2 ' Module Name: COMRECT.vb
3 ' Project: VBCustomIEContextMenu
4 ' Copyright (c) Microsoft Corporation.
6 ' The class COMRECT is used to define the outer rectangle of the border.
9 ' This source is subject to the Microsoft Public License.
10 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 ' All other rights reserved.
13 ' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
14 ' EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
15 ' WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
16 '*************************************************************************'
18 Imports System
.Drawing
19 Imports System
.Runtime
.InteropServices
21 Namespace NativeMethods
22 <StructLayout(LayoutKind
.Sequential
)>
24 Public left
As Integer
26 Public right
As Integer
27 Public bottom
As Integer
29 Public Overrides
Function ToString() As String
31 New Object() {" Left = ", Me.left
,
33 " Right = ", Me.right
,
34 " Bottom = ", Me.bottom
})
40 Public Sub New(ByVal r
As Rectangle
)
47 Public Sub New(ByVal left
As Integer,
49 ByVal right
As Integer,
50 ByVal bottom
As Integer)
57 Public Shared
Function FromXYWH(ByVal x
As Integer,
59 ByVal width
As Integer,
60 ByVal height
As Integer) _
61 As NativeMethods
.COMRECT
62 Return New NativeMethods
.COMRECT(x
, y
, x
+ width
, y
+ height
)